﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControls_Left_Trends : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //定义sql语句
            string sql = "select top 13 newsID,newsTitle from News_Info where newsIsShow=1 order by newsTime desc";
            //取得数据并绑定到GridView
            rptTrends.DataSource = DataAccess.GetDataTable(sql, null);
            //为GridView绑定数据
            rptTrends.DataBind();
        }
    }
}